﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace NJL.WebUsers.Shop
{
    public partial class ShopDescription : BasePageVisitor
    {
        private readonly NJL.BLL.NJL_COMPANY bllCompany = new BLL.NJL_COMPANY();
        protected NJL.Model.NJL_COMPANY modelCompany;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                modelCompany = bllCompany.GetModel(Request.QueryString["id"].ToString());
                litCompanyName.Text = modelCompany.COMPANY_NAME;
                litContent.Text = modelCompany.COMPANY_DESCRIPTION;
                LoadPageSEO();
            }

        }

        /// <summary>
        /// 加载页面SEO
        /// </summary>
        private void LoadPageSEO()
        {
            Page.Title = modelCompany.SEO_TITLE;

            HtmlMeta myMeta = new HtmlMeta();
            myMeta.Name = "Keywords";
            myMeta.Content = modelCompany.SEO_KEYWORDS;
            this.Header.Controls.Add(myMeta);

            HtmlMeta myMeta1 = new HtmlMeta();
            myMeta1.Name = "Description";
            myMeta1.Content = modelCompany.SEO_DESCRIPTION;
            this.Header.Controls.Add(myMeta1);
        }

    }
}